﻿using SLClient.CustomerControls;
using SLClient.Extension;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;

namespace SLClient.Views
{
    public partial class ZxsscView : Page
    {
        public int lotteryCatagoryId;

        public ZxsscView()
        {
            PlayDataInfo sscData;
            this.lotteryCatagoryId = 3;
            this.InitializeComponent();
            if (!IsolatedStorageHelper<PlayDataInfo>.IsSettingPersisted("ssc"))
            {
                sscData = new PlayDataInfo(this.lotteryCatagoryId, "ssc");
            }
            else if (ViewDispatcher.SscData.CurrentPlayData.OpenTime <= DateTime.Now)
            {
                sscData = new PlayDataInfo(this.lotteryCatagoryId, "ssc");
            }
            else
            {
                sscData = ViewDispatcher.SscData;
            }
            BonusControl bonuscontrol = new BonusControl(sscData);
            this.gridUp.Children.Add(bonuscontrol);
            bonuscontrol.SetValue(FrameworkElement.HorizontalAlignmentProperty, (HorizontalAlignment)0);
            bonuscontrol.SetValue(FrameworkElement.VerticalAlignmentProperty, (VerticalAlignment)0);
            LastOpenDataControl control2 = new LastOpenDataControl(sscData);
            this.gridUp.Children.Add(control2);
            control2.SetValue(Grid.ColumnProperty, 1);
            control2.SetValue(FrameworkElement.MarginProperty, new Thickness(5.0, 0.0, 0.0, 0.0));
            Top10WinnerControl control3 = new Top10WinnerControl(sscData);
            this.gridDown.Children.Add(control3);
            control3.SetValue(FrameworkElement.HorizontalAlignmentProperty, (HorizontalAlignment)2);
            control3.SetValue(FrameworkElement.VerticalAlignmentProperty, (VerticalAlignment)0);
            control3.SetValue(Grid.ColumnProperty, 1);
            this.m_BetControl.InitPage(StringResource.ZxSsc, new BetPlayTypeInfo[] { new BetPlayTypeInfo(2, "三星直选", new BetPlayInfo[] { new BetPlayInfo(7, "后三直选复式", 0, 1, 3, 2, true), new BetPlayInfo(8, "后三直选单式", 0, 0, 3, 2, true), new BetPlayInfo(9, "前三直选复式", 0, 1, 3, 0, true), new BetPlayInfo(10, "前三直选单式", 0, 0, 3, 0, true) }), new BetPlayTypeInfo(3, "三星组选", new BetPlayInfo[] { new BetPlayInfo(11, "后三组选组六", 1, 1, 1, 2, true), new BetPlayInfo(12, "后三组选组三", 1, 1, 1, 2, true), new BetPlayInfo(14, "后三组选混合", 4, 0, 3, 2, true), new BetPlayInfo(15, "前三组选组六", 1, 1, 1, 0, true), new BetPlayInfo(0x10, "前三组选组三", 1, 1, 1, 0, true), new BetPlayInfo(0x12, "前三组选混合", 4, 0, 3, 0, true) }), new BetPlayTypeInfo(4, "二星直选", new BetPlayInfo[] { new BetPlayInfo(0x13, "后二直选复式", 0, 1, 2, 3, true), new BetPlayInfo(0x15, "后二直选单式", 0, 0, 2, 3, true), new BetPlayInfo(0x17, "前二直选复式", 0, 1, 2, 0, true), new BetPlayInfo(0x18, "前二直选单式", 0, 0, 2, 0, true) }), new BetPlayTypeInfo(5, "二星组选", new BetPlayInfo[] { new BetPlayInfo(0x19, "后二组选组二", 1, 1, 1, 3, true), new BetPlayInfo(0x1a, "后二组选混合", 4, 0, 2, 3, true), new BetPlayInfo(0x1c, "前二组选组二", 1, 1, 1, 0, true), new BetPlayInfo(0x1d, "前二组选混合", 4, 0, 2, 0, true) }), new BetPlayTypeInfo(6, "后一直选", new BetPlayInfo[] { new BetPlayInfo(0x1f, "后一直选复式", 0, 1, 1, 4, true) }), new BetPlayTypeInfo(7, "不定位胆", new BetPlayInfo[] { new BetPlayInfo(0x20, "后三不定位胆", 2, 1, 1, 2, true), new BetPlayInfo(0x21, "前三不定位胆", 2, 1, 1, 0, true), new BetPlayInfo(0x22, "五星不定位胆", 2, 1, 1, 0, true) }), new BetPlayTypeInfo(8, "定位胆", new BetPlayInfo[] { new BetPlayInfo(0x24, "五星定位胆", 3, 1, 5, 0, true) }) }, bonuscontrol, this.lotteryCatagoryId);
        }

    }
}
